package common.wind;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class WindDateTime {

	private Date windDay;
	private Calendar windCalendar;

	public static final String WINDEOLODATEFORMAT = "dd/MM/yyyy-HH:mm";

	private static DateFormat df = new SimpleDateFormat(WINDEOLODATEFORMAT);
	
	public WindDateTime(String aDay, String aTime) throws ParseException {
		this.windDay = df.parse(aDay + "-" + aTime);
		this.windCalendar = Calendar.getInstance();
		this.windCalendar.setTime(this.windDay);

	}

	public Date getWindDay() {
		return windDay;
	}

	public String toString() {
		return windDay.toString();
	}

	public int getHour() {
		return windCalendar.get(Calendar.HOUR_OF_DAY);
	}

	public int getMin() {
		return windCalendar.get(Calendar.MINUTE);
	}

	public int getDayOfYear() {
		return windCalendar.get(Calendar.DAY_OF_YEAR);
	}

	public int getYear() {
		return windCalendar.get(Calendar.YEAR);
	}

	public int getMonth() {
		return windCalendar.get(Calendar.MONTH);
	}

	public int getDay() {
		return windCalendar.get(Calendar.DAY_OF_MONTH);
	}

}
